home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 1998 November / IRIX 6.5.2 Base Documentation November 1998.img / usr / share / catman / p_man / cat3 / Xi / XGetFeedbackControl.z / XGetFeedbackControl
Text File  |  1998-10-30  |  16KB  |  397 lines

  1.  
  2.  
  3.  
  4.      XXXXGGGGeeeettttFFFFeeeeeeeeddddbbbbaaaacccckkkkCCCCoooonnnnttttrrrroooollll((((3333XXXX11111111))))XXXX VVVVeeeerrrrssssiiiioooonnnn 11111111 ((((RRRReeeelllleeeeaaaasssseeee 6666....3333))))XXXXGGGGeeeettttFFFFeeeeeeeeddddbbbbaaaacccckkkkCCCCoooonnnnttttrrrroooollll((((3333XXXX11111111))))
  5.  
  6.  
  7.  
  8.      NNNNAAAAMMMMEEEE
  9.           XGetFeedbackControl, XChangeFeedbackControl - query and
  10.           change input device feedbacks
  11.  
  12.      SSSSYYYYNNNNTTTTAAAAXXXX
  13.           XFeedbackState * XGetFeedbackControl(_d_i_s_p_l_a_y, _d_e_v_i_c_e,
  14.           _n_u_m__f_e_e_d_b_a_c_k_s)
  15.                 Display *_d_i_s_p_l_a_y;
  16.                 XDevice *_d_e_v_i_c_e;
  17.                 int *_n_u_m__f_e_e_d_b_a_c_k_s;
  18.  
  19.           int XChangeFeedbackControl(_d_i_s_p_l_a_y, _d_e_v_i_c_e, _m_a_s_k, _c_o_n_t_r_o_l)
  20.                 Display *_d_i_s_p_l_a_y;
  21.                 XDevice *_d_e_v_i_c_e;
  22.                 Mask _m_a_s_k;
  23.                 XFeedbackControl *_c_o_n_t_r_o_l;
  24.  
  25.      AAAARRRRGGGGUUUUMMMMEEEENNNNTTTTSSSS
  26.           _d_i_s_p_l_a_y        Specifies the connection to the X server.
  27.  
  28.           _d_e_v_i_c_e         Specifies the device whose feedbacks are to
  29.                          be queried or modified.
  30.  
  31.           _n_u_m__f_e_e_d_b_a_c_k_s  Specifies an address into which the number of
  32.                          feedbacks supported by the device is to be
  33.                          returned.
  34.  
  35.           _m_a_s_k           Specifies a mask specific to each type of
  36.                          feedback that describes how the feedback is
  37.                          to be modified.
  38.  
  39.           _c_o_n_t_r_o_l        Specifies the address of an _X_F_e_e_d_b_a_c_k_C_o_n_t_r_o_l
  40.                          structure that contains the new values for
  41.                          the feedback.
  42.  
  43.      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  44.           These requests are provided to manipulate those input
  45.           devices that support feedbacks.  A _B_a_d_M_a_t_c_h error will be
  46.           generated if the requested device does not support
  47.           feedbacks.  Whether or not a given device supports feedbacks
  48.           can be determined by examining the information returned by
  49.           the _X_O_p_e_n_D_e_v_i_c_e request.  For those devices that support
  50.           feedbacks, _X_O_p_e_n_D_e_v_i_c_e will return an _X_I_n_p_u_t_C_l_a_s_s_I_n_f_o
  51.           structure with the input_class field equal to the constant
  52.           _F_e_e_d_b_a_c_k_C_l_a_s_s (defined in the file _X_I._h).
  53.  
  54.           The _X_G_e_t_F_e_e_d_b_a_c_k_C_o_n_t_r_o_l request returns a pointer to a list
  55.           of _X_F_e_e_d_b_a_c_k_S_t_a_t_e structures.  Each item in this list
  56.           describes one of the feedbacks supported by the device.  The
  57.           items are variable length, so each contains its length to
  58.           allow traversal to the next item in the list.
  59.  
  60.  
  61.  
  62.  
  63.      Page 1                                          (printed 4/30/98)
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.      XXXXGGGGeeeettttFFFFeeeeeeeeddddbbbbaaaacccckkkkCCCCoooonnnnttttrrrroooollll((((3333XXXX11111111))))XXXX VVVVeeeerrrrssssiiiioooonnnn 11111111 ((((RRRReeeelllleeeeaaaasssseeee 6666....3333))))XXXXGGGGeeeettttFFFFeeeeeeeeddddbbbbaaaacccckkkkCCCCoooonnnnttttrrrroooollll((((3333XXXX11111111))))
  71.  
  72.  
  73.  
  74.           The feedback classes that are currently defined are:
  75.           _K_b_d_F_e_e_d_b_a_c_k_C_l_a_s_s, _P_t_r_F_e_e_d_b_a_c_k_C_l_a_s_s, _S_t_r_i_n_g_F_e_e_d_b_a_c_k_C_l_a_s_s,
  76.           _I_n_t_e_g_e_r_F_e_e_d_b_a_c_k_C_l_a_s_s, _L_e_d_F_e_e_d_b_a_c_k_C_l_a_s_s, and
  77.           _B_e_l_l_F_e_e_d_b_a_c_k_C_l_a_s_s.  These constants are defined in the file
  78.           _X_I._h.  An input device may support zero or more classes of
  79.           feedback, and may support multiple feedbacks of the same
  80.           class.  Each feedback contains a class identifier and an id
  81.           that is unique within that class for that input device.  The
  82.           id is used to identify the feedback when making an
  83.           _X_C_h_a_n_g_e_F_e_e_d_b_a_c_k_C_o_n_t_r_o_l request.
  84.  
  85.           _X_G_e_t_F_e_e_d_b_a_c_k_C_o_n_t_r_o_l can generate a _B_a_d_D_e_v_i_c_e or _B_a_d_M_a_t_c_h
  86.           error.
  87.  
  88.           The _X_C_h_a_n_g_e_F_e_e_d_b_a_c_k_C_o_n_t_r_o_l request modifies the values of
  89.           one feedback on the specified device.  The feedback is
  90.           identified by the id field of the _X_F_e_e_d_b_a_c_k_C_o_n_t_r_o_l structure
  91.           that is passed with the request.  The fields of the feedback
  92.           that are to be modified are identified by the bits of the
  93.           mask that is passed with the request.
  94.  
  95.           _X_C_h_a_n_g_e_F_e_e_d_b_a_c_k_C_o_n_t_r_o_l can generate a _B_a_d_D_e_v_i_c_e, _B_a_d_M_a_t_c_h,
  96.           or _B_a_d_V_a_l_u_e  error.
  97.  
  98.      SSSSTTTTRRRRUUUUCCCCTTTTUUUURRRREEEESSSS
  99.           Each class of feedback is described by a structure specific
  100.           to that class.  These structures are defined in the file
  101.           _X_I_n_p_u_t._h.  _X_F_e_e_d_b_a_c_k_S_t_a_t_e and _X_F_e_e_d_b_a_c_k_C_o_n_t_r_o_l are generic
  102.           structures that contain three fields that are at the
  103.           beginning of each class of feedback:
  104.  
  105.           typedef struct {
  106.                XID class;
  107.                int length;
  108.                XID id;
  109.           } XFeedbackState, XFeedbackControl;
  110.  
  111.           The _X_K_b_d_F_e_e_d_b_a_c_k_S_t_a_t_e structure defines the attributes that
  112.           are returned for feedbacks equivalent to those on the X
  113.           keyboard.
  114.  
  115.           typedef struct {
  116.                XID     class;
  117.                int     length;
  118.                XID     id;
  119.                int     click;
  120.                int     percent;
  121.                int     pitch;
  122.                int     duration;
  123.                int     led_mask;
  124.                int     global_auto_repeat;
  125.                char    auto_repeats[32];
  126.  
  127.  
  128.  
  129.      Page 2                                          (printed 4/30/98)
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.      XXXXGGGGeeeettttFFFFeeeeeeeeddddbbbbaaaacccckkkkCCCCoooonnnnttttrrrroooollll((((3333XXXX11111111))))XXXX VVVVeeeerrrrssssiiiioooonnnn 11111111 ((((RRRReeeelllleeeeaaaasssseeee 6666....3333))))XXXXGGGGeeeettttFFFFeeeeeeeeddddbbbbaaaacccckkkkCCCCoooonnnnttttrrrroooollll((((3333XXXX11111111))))
  137.  
  138.  
  139.  
  140.           } XKbdFeedbackState;
  141.  
  142.           The _X_P_t_r_F_e_e_d_b_a_c_k_S_t_a_t_e structure defines the attributes that
  143.           are returned for feedbacks equivalent to those on the the X
  144.           pointer.
  145.  
  146.           typedef struct {
  147.                XID     class;
  148.                int     length;
  149.                XID     id;
  150.                int     accelNum;
  151.                int     accelDenom;
  152.                int     threshold;
  153.           } XPtrFeedbackState;
  154.  
  155.           The _X_I_n_t_e_g_e_r_F_e_e_d_b_a_c_k_S_t_a_t_e structure defines attributes that
  156.           are returned for integer feedbacks.
  157.  
  158.           typedef struct {
  159.                XID     class;
  160.                int     length;
  161.                XID     id;
  162.                int     resolution;
  163.                int     minVal;
  164.                int     maxVal;
  165.           } XIntegerFeedbackState;
  166.  
  167.           The _X_S_t_r_i_n_g_F_e_e_d_b_a_c_k_S_t_a_t_e structure defines the attributes
  168.           that are returned for string feedbacks.
  169.  
  170.           typedef struct {
  171.                XID     class;
  172.                int     length;
  173.                XID     id;
  174.                int     max_symbols;
  175.                int     num_syms_supported;
  176.                KeySym  *syms_supported;
  177.           } XStringFeedbackState;
  178.  
  179.           The _X_B_e_l_l_F_e_e_d_b_a_c_k_S_t_a_t_e structure defines the attributes that
  180.           are returned for bell feedbacks.
  181.  
  182.           typedef struct {
  183.                XID     class;
  184.                int     length;
  185.                XID     id;
  186.                int     percent;
  187.                int     pitch;
  188.                int     duration;
  189.           } XBellFeedbackState;
  190.  
  191.           The _X_L_e_d_F_e_e_d_b_a_c_k_S_t_a_t_e structure defines the attributes that
  192.  
  193.  
  194.  
  195.      Page 3                                          (printed 4/30/98)
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.      XXXXGGGGeeeettttFFFFeeeeeeeeddddbbbbaaaacccckkkkCCCCoooonnnnttttrrrroooollll((((3333XXXX11111111))))XXXX VVVVeeeerrrrssssiiiioooonnnn 11111111 ((((RRRReeeelllleeeeaaaasssseeee 6666....3333))))XXXXGGGGeeeettttFFFFeeeeeeeeddddbbbbaaaacccckkkkCCCCoooonnnnttttrrrroooollll((((3333XXXX11111111))))
  203.  
  204.  
  205.  
  206.           are returned for LED feedbacks.
  207.  
  208.           typedef struct {
  209.                XID     class;
  210.                int     length;
  211.                XID     id;
  212.                int     led_values;
  213.           } XLedFeedbackState;
  214.  
  215.           The _X_P_r_t_F_e_e_d_b_a_c_k_C_o_n_t_r_o_l structure defines the attributes
  216.           that can be controlled for pointer feedbacks.
  217.  
  218.           typedef struct {
  219.                XID     class;
  220.                int     length;
  221.                XID     id;
  222.                int     accelNum;
  223.                int     accelDenom;
  224.                int     threshold;
  225.           } XPtrFeedbackControl;
  226.  
  227.           The _X_K_b_d_F_e_e_d_b_a_c_k_C_o_n_t_r_o_l structure defines the attributes
  228.           that can be controlled for keyboard feedbacks.
  229.  
  230.           typedef struct {
  231.                XID     class;
  232.                int     length;
  233.                XID     id;
  234.                int     click;
  235.                int     percent;
  236.                int     pitch;
  237.                int     duration;
  238.                int     led_mask;
  239.                int     led_value;
  240.                int     key;
  241.                int     auto_repeat_mode;
  242.           } XKbdFeedbackControl;
  243.  
  244.           The _X_S_t_r_i_n_g_F_e_e_d_b_a_c_k_C_o_n_t_r_o_l structure defines the attributes
  245.           that can be controlled for string feedbacks.
  246.  
  247.           typedef struct {
  248.                XID     class;
  249.                int     length;
  250.                XID     id;
  251.                int     num_keysyms;
  252.                KeySym  *syms_to_display;
  253.           } XStringFeedbackControl;
  254.  
  255.           The _X_I_n_t_e_g_e_r_F_e_e_d_b_a_c_k_C_o_n_t_r_o_l structure defines the attributes
  256.           that can be controlled for integer feedbacks.
  257.  
  258.  
  259.  
  260.  
  261.      Page 4                                          (printed 4/30/98)
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.      XXXXGGGGeeeettttFFFFeeeeeeeeddddbbbbaaaacccckkkkCCCCoooonnnnttttrrrroooollll((((3333XXXX11111111))))XXXX VVVVeeeerrrrssssiiiioooonnnn 11111111 ((((RRRReeeelllleeeeaaaasssseeee 6666....3333))))XXXXGGGGeeeettttFFFFeeeeeeeeddddbbbbaaaacccckkkkCCCCoooonnnnttttrrrroooollll((((3333XXXX11111111))))
  269.  
  270.  
  271.  
  272.           typedef struct {
  273.                XID     class;
  274.                int     length;
  275.                XID     id;
  276.                int     int_to_display;
  277.           } XIntegerFeedbackControl;
  278.  
  279.           The _X_B_e_l_l_F_e_e_d_b_a_c_k_C_o_n_t_r_o_l structure defines the attributes
  280.           that can be controlled for bell feedbacks.
  281.  
  282.           typedef struct {
  283.                XID     class;
  284.                int     length;
  285.                XID     id;
  286.                int     percent;
  287.                int     pitch;
  288.                int     duration;
  289.           } XBellFeedbackControl;
  290.  
  291.           The _X_L_e_d_F_e_e_d_b_a_c_k_C_o_n_t_r_o_l structure defines the attributes
  292.           that can be controlled for LED feedbacks.
  293.  
  294.           typedef struct {
  295.                XID     class;
  296.                int     length;
  297.                XID     id;
  298.                int     led_mask;
  299.                int     led_values;
  300.           } XLedFeedbackControl;
  301.  
  302.      DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  303.           _B_a_d_D_e_v_i_c_e   An invalid device was specified.  The specified
  304.                       device does not exist or has not been opened by
  305.                       this client via _X_O_p_e_n_I_n_p_u_t_D_e_v_i_c_e.  This error
  306.                       may also occur if some other client has caused
  307.                       the specified device to become the X keyboard or
  308.                       X pointer device via the _X_C_h_a_n_g_e_K_e_y_b_o_a_r_d_D_e_v_i_c_e
  309.                       or _X_C_h_a_n_g_e_P_o_i_n_t_e_r_D_e_v_i_c_e requests.
  310.  
  311.           _B_a_d_M_a_t_c_h    This error may occur if an _X_G_e_t_F_e_e_d_b_a_c_k_C_o_n_t_r_o_l
  312.                       request was made specifying a device that has no
  313.                       feedbacks, or an _X_C_h_a_n_g_e_F_e_e_d_b_a_c_k_C_o_n_t_r_o_l request
  314.                       was made with an _X_F_e_e_d_b_a_c_k_C_o_n_t_r_o_l structure that
  315.                       contains an invalid feedback type.  It may also
  316.                       occur if an invalid combination of mask bits is
  317.                       specified (_D_v_K_e_y but no _D_v_A_u_t_o_R_e_p_e_a_t_M_o_d_e for
  318.                       keyboard feedbacks), or if an invalid KeySym is
  319.                       specified for a string feedback.
  320.  
  321.           _B_a_d_V_a_l_u_e    Some numeric value falls outside the range of
  322.                       values accepted by the _X_C_h_a_n_g_e_F_e_e_d_b_a_c_k_C_o_n_t_r_o_l
  323.                       request.  Unless a specific range is specified
  324.  
  325.  
  326.  
  327.      Page 5                                          (printed 4/30/98)
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.      XXXXGGGGeeeettttFFFFeeeeeeeeddddbbbbaaaacccckkkkCCCCoooonnnnttttrrrroooollll((((3333XXXX11111111))))XXXX VVVVeeeerrrrssssiiiioooonnnn 11111111 ((((RRRReeeelllleeeeaaaasssseeee 6666....3333))))XXXXGGGGeeeettttFFFFeeeeeeeeddddbbbbaaaacccckkkkCCCCoooonnnnttttrrrroooollll((((3333XXXX11111111))))
  335.  
  336.  
  337.  
  338.                       for an argument, the full range defined by the
  339.                       argument's type is accepted.  Any argument
  340.                       defined as a set of alternatives can generate
  341.                       this error.
  342.  
  343.      SSSSEEEEEEEE AAAALLLLSSSSOOOO
  344.           _P_r_o_g_r_a_m_m_i_n_g _W_i_t_h _X_l_i_b
  345.  
  346.  
  347.  
  348.  
  349.  
  350.  
  351.  
  352.  
  353.  
  354.  
  355.  
  356.  
  357.  
  358.  
  359.  
  360.  
  361.  
  362.  
  363.  
  364.  
  365.  
  366.  
  367.  
  368.  
  369.  
  370.  
  371.  
  372.  
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.      Page 6                                          (printed 4/30/98)
  394.  
  395.  
  396.  
  397.